package com.demo.ai.springaidemo.controller;


import com.demo.ai.springaidemo.param.ChatParam;
import com.demo.ai.springaidemo.service.chat.ChatService;
import jakarta.annotation.Resource;
import org.springframework.http.codec.ServerSentEvent;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;

/**
 * @author wangbo
 * @date 2025/04/02
 */
@RestController
@RequestMapping("/ai")
public class AIChatDeepSeekController {

    @Resource
    private ChatService chatService;

    @PostMapping("/chat")
    public Flux<ServerSentEvent<String>> chat(@RequestBody ChatParam param) {

        return chatService.chatParking(param);
    }


}


